//
//  InviteUserTabCell.m
//  TenMinDemo
//
//  Created by Shawn Li on 2021/3/10.
//  Copyright © 2021 CYXiang. All rights reserved.
//

#import "InviteUserTabCell.h"
#import "DateTool.h"
@interface InviteUserTabCell()
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UILabel *type;

@end
@implementation InviteUserTabCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)refreshWith:(InviteAccountItem *)model{
    self.title.text = [NSString stringWithFormat:@"%@(%@)",model.name?model.name:@"",model.hid];
    self.time.text = [DateTool timeDateYearStrWithTime:model.registerTime];
    self.type.hidden = model.isSuper;
    self.type.text = [model.effectiveType isEqualToString:@"POTENTIAL_EFFECTIVE"] ? LCLocalString(@"yh_yx") : LCLocalString(@"yh_qzyx");
    self.icon.image = model.icon ? model.icon : DefaultUserIcon;
}

@end
